package dk.controller;

import java.util.Date;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.ReturnData.ResponseData;
import com.beans.Datelist;

import dk.service.ApiService;

@RestController
@RequestMapping("api")
public class DateListController {
	@Autowired
	ApiService apiservice;
@PostMapping("GetDateListByDate")
public ResponseData GetDateListByDate(String StartTimeYear,
		String StartTimeMonth,
		String StartTimeDay,
		String  EndTimeYear,
		String EndTimeMonth,
		String EndTimeDay) {
	return apiservice.GetDateListByDate(StartTimeYear,StartTimeMonth,StartTimeDay,EndTimeYear,EndTimeMonth,EndTimeDay);
	
}
@PostMapping("DeleteDateListById")
public ResponseData DeleteDateListById(Integer id) {
	return apiservice.DeleteDateListById(id);
}
@PostMapping("GetDateListById")
public ResponseData GetDateListById(Integer id) {
	return apiservice.GetDateListById(id);
	
}
@PostMapping("UpdateDateListById")
public ResponseData UpdateDateListById(String title,String content,Integer level,String runtime,Integer id) {
	
	
	return apiservice.UpdateDateListById(title,content,level,runtime,id);
	
}
@PostMapping("InsertDateList")
public ResponseData InsertDateList(String title,String content,Integer level,String year,String month,String day) {
	return apiservice.InsertDateList(title,content,level,year,month,day);
}

}
